package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"weiyun-management-system/api/internal/config"
	"weiyun-management-system/weirpc/weirpcclient"
)

type ServiceContext struct {
	Config config.Config
	WeiRpc weirpcclient.Weirpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		WeiRpc: weirpcclient.NewWeirpc(zrpc.MustNewClient(c.WeiRpc)),
	}
}
